#pragma once

#include "DirectXPage.xaml.h"
#include "TicTacToeAI.h"

namespace TicTacToe
{
	public ref class MainController sealed
	{
	public:
		MainController(DirectXPage^ page, GameModel^ model);
		//~MainController(void);
		property DirectXPage^ View;
		property GameModel^ Model;
		property TicTacToeAI^ TicTacToeAI;

	private:
		void HandleNewGameRequested();
		void HandleFieldSelected();
		void MakeAITurn();
		bool CheckGameHasWinner();
		bool CheckGameIsOver();
		void SwitchPlayer();
		void Sleep(int milliseconds);
	};
}

